<? if(!defined('IN_MDL')) exit('Access Denied');?>
<? include $this->gettpl('header');?> 
 <script type="text/javascript" src="Scripts/Product_Img_Tip.js"></script>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#e6e6e6"><table width="920" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="200" valign="top">
		<? include $this->gettpl('usermenu');?> 
		</td>
        <td width="720" bgcolor="#FFFFFF"><table width="700" border="0" align="center" cellpadding="0" cellspacing="10" bgcolor="#666666">
          <tr>
            <td height="580" valign="top" bgcolor="#FFFFFF"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="50%" height="60" class="Title">您好！<?=$info['username']?>，欢迎您回来！</td>
                <td width="50%">您上次登录的时间是：<?=$info['last_time']?></td>
                </tr>
              <tr>
                <td height="30"><?=$rank_name?></td>
                <td>享受折扣：95％</td>
                </tr><td colspan="2"  class="line_Bg_1"></td>
                  <tr>
                    
                    </tr>
              <tr>
                <td height="30">账户积分：<?=$user['discount']?></td>
                <td>完成订单：<?=$order_num?></td>
                </tr>
              <tr>
                <td colspan="2" class="line_Bg_1"></td>
                </tr>
              </table>
			  <? if($orders_len!=0) { ?>
				          <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="20" colspan="6"></td>
                  </tr>
                <tr>
                  <td colspan="6" class="line_Bg_1" height="1"></td>
                  </tr>
                <tr>
                  <td colspan="6" height="2"></td>
                  </tr>
                 <tr bgcolor="#e6e6e6">
                  <td width="15%" height="30" align="center"><strong>订单号</strong></td>
                 
                  <td width="15%" align="center"><strong>订单金额</strong></td>                
                  <td width="" align="center"><strong>订单状态</strong></td>
                  <td width="" align="center"><strong>购买日期</strong></td>
                  <td align="center">操作</td>
                  </tr>
                <tr>
                  <td colspan="6" height="2"></td>
                  </tr>
				   <? foreach((array)$orders as $key => $list) {?>
					 <tr>
						<td colspan="6" class="line_Bg_1" height="1"></td>
					  </tr>
					 <tr>
						  <td height="25" align="center"><a href="<? echo U('detail',array('orderid'=>$list['order_id']))?>" class="Order_a"><?=$list['order_sn']?></a></td>						
						  <td align="center"><?=$list['total_fee']?></td>
						  <td align="center"><?=$list['order_status']?></td>
						  <td align="center"><?=$list['order_time']?></td>
						  <td align="center"><?=$list['handler']?></td>
					  </tr>  
 					<?}?>
                
                <tr>
                  <td colspan="6" class="line_Bg_1" height="1"></td>
                  </tr>
                </table>
              <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="8"></td>
                  </tr>
                <tr>
                  <td><span class="Hot_Txt">温馨提示：</span><br />
                    一、点击订单号可以查看订单详细情况；<br />
                    二、收货后请在订单详情中点击已收货，谢谢合作；<br />
                    三、未收到货或其它订单相关问题，可以点击“投诉”，说明原因<br />
                    <br /></td>
                  </tr>
                </table>
				<? } ?>
              <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td class="line_Bg_1"></td>
                </tr>
                <tr>
                  <td height="30" bgcolor="#f9f9f9" class="Categories_Menu">&nbsp;&nbsp;<span class="txt_B">您最近浏览过...</span></td>
                </tr>
                <tr>
                  <td class="line_Bg_1"></td>
                </tr>
                <tr>
                  <td height="60"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="" height="100" align="center">
                      
                      <?=$history?>
                      </td>
                    </tr>
                    </table></td>
                </tr>
                <tr>
                  <td class="line_Bg_1"></td>
                </tr>
              </table></td>
            </tr>
        </table></td>
        </tr>
    </table></td>
  </tr>
</table>
<? include $this->gettpl('footer');?>